//
//  E7Cell.h
//  EndlessBattle
//
//  Created by cc on 12-3-17.
//  Copyright (c) 2012年 PalmGame. All rights reserved.
//

#ifndef EndlessBattle_E7Cell_h
#define EndlessBattle_E7Cell_h

#include "E7GameDefine.h"

class CE7Cell
{
public:
    CE7Cell() ;
    ~CE7Cell() ;

    void   SetID(int nID)                             { m_nID = nID ; }
    void   SetNeighborCount(int count)                { m_nNeighborCount = count ; }
    void   SetBordersPos(int index, CCPoint pos)      { m_posBorders[index] = pos ; }
    void   SetCenterPos(CCPoint pos)                  { m_posCenter = pos ; }
    void   SetNeighborPointers(int index, CE7Cell* p) { m_pNeighbors[index] = p ; }
    void   SetCountryID(int countryid)                { m_nCountryID = countryid ; }
    void   SetTownID(int townid)                      { m_nTownID = townid ; }
    void   SetUnitID(int unitid)                      { m_nUnitID = unitid ; }
    void   SetUV(eUnitValue value)                    { m_nUnitValue = value ; }
    void   UpdateUV() ;
//    void   SetLock()                                  { m_bIsLock = true ; }

public:
//    bool       IsLock()                               { return m_bIsLock ; }
    int        GetID()                                { return m_nID ; }
    int        GetNeighborCount()                     { return m_nNeighborCount ; }
    CCPoint    GetBorders(int index)                  { return m_posBorders[index] ; }
    CCPoint    GetCenter()                            { return m_posCenter ; }
    CE7Cell*   GetNeighborPointer(int index)          { return m_pNeighbors[index] ; }
    int        GetCountryID()                         { return m_nCountryID ; }
    int        GetTownID()                            { return m_nTownID ; }
    int        GetUnitID()                            { return m_nUnitID ; }
    eUnitValue GetUV()                                { return m_nUnitValue ; }
    eUnitValue GetToNeighborUV()                      { return m_nToNeighborUV ; }

    CCPoint*   GetBorderPoints()                      { return m_posBorders ; }

public:
    // debug mode.
    eUnitValue  m_eDebugUV ;

private:
//    bool        m_bIsLock ; 
    int         m_nID ;
    int         m_nNeighborCount ;

    CCPoint     m_posBorders[6] ;
    CCPoint     m_posCenter ;

    CE7Cell*    m_pNeighbors[6] ;

    int         m_nCountryID ;
    int         m_nTownID ;
    int         m_nUnitID ;
    eUnitValue  m_nUnitValue ;
    eUnitValue  m_nToNeighborUV ;
} ;

#endif














